using Microsoft.Xna.Framework;
using SCSEngine.Utils.Entities.Component;
using SCSEngine.Utils.Entities.Component.Camera2D;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SCSEngine.Utils.Entities.Process.Update
{
    public class Camera2DUpdate : GameComponent
    {
        private ICamera2DComponent camera;

        public Camera2DUpdate(GameEntity entity)
            : base(null)
        {
            this.camera = entity.GetComponent<ICamera2DComponent>(ComponentKeys.Camera2D);
        }

        public override void Update(GameTime gameTime)
        {
            this.camera.Update(gameTime);
            base.Update(gameTime);
        }
    }
}
